package main

import (
	"fmt"
	"strconv"
)

func main() {
	const nodeNumber = 10
	const committeeNum = 2
	var nodeStartNum string = "8000"

	// 确定委员会编号【节点数目是委员会数目的倍数】
	relation := nodeNumber / committeeNum

	dict := make(map[int][]string)

	startNodeID, _ := strconv.Atoi(nodeStartNum)
	for i := 0; i < nodeNumber; i++ {
		committeeID := i/relation + 1
		dict[committeeID] = append(dict[committeeID], strconv.Itoa(startNodeID+i))
	}

	fmt.Printf("%v\n", dict)

	for key, value := range dict {
		for _, item := range value {
			if item == "8007" {
				fmt.Println(key, item)
			}
		}
	}
}
